package cn.admin.remoting.impl;

import cn.admin.remoting.Connection;
import cn.admin.remoting.IOEventListener;
import cn.admin.remoting.util.LoggerInit;

class LCL_negotiateIdleTimeout implements IOEventListener.ConnectionLifecycleListener {

    @Override
    public void connectionOpened(Connection connection) {
        String url = connection.getClient().getConnectionUrl();
        ConnectionHeartBeat hb = new ConnectionHeartBeat(url);
        connection.getClient().invokeWithFuture(hb,null);
        LoggerInit.LOGGER.debug("[heart-beat] To " + connection.getRemoteSocket());
    }

    @Override
    public void connectionClosed(Connection connection) {

    }
}
